"""
WSGI Core Services Application setup.
"""
import os
import sys

from webapp2 import WSGIApplication, Route

CURRENT_PATH = os.path.abspath(os.path.dirname(__file__))

ROUTES = [
    Route('/populate', 'views.Populate'),
    Route('/backup', 'views.Backup'),
    Route('/upload', 'views.Upload'),
    Route('/download', 'views.Download'),
    Route('/query', 'views.Query'),
    Route('/', 'views.Index'),
]

CONFIG = {
    'webapp2_extras.jinja2' : {
        'template_path': os.path.join(CURRENT_PATH, 'templates')
    }
}

APP = WSGIApplication(ROUTES, config=CONFIG)
